﻿@model IEnumerable<Pr0ject0.Models.QuestionModel>

@{
    ViewBag.Title = "Questionnaire";
}

<h2>Questionnaire</h2>
@using(@Html.BeginForm()){
    foreach (var item in Model)
    {
        switch (item.type)
        {
            case 0 :
                //true/false
                @Html.Partial("~\\Views\\Shared\\_PartialQuestionTrueFalse.cshtml", item)
                break;
            case 1 :
                @Html.Partial("~\\Views\\Shared\\_PartialQuestionMultipleChoice.cshtml", item)        
                break;
            case 2 :
                @Html.Partial("~\\Views\\Shared\\_PartialQuestionTexBox.cshtml", item)                
                break;
            case 3 :
                @Html.Partial("~\\Views\\Shared\\_PartialQuestionExplain.cshtml",item)        
                break;
        }
    }
<input type="submit" />
}